<?php
$template->set_filenames(array("body"=>"template/view_one_user.tpl"));
for ($i = 0; $i < sizeof($arr_all_user); $i++) {
	$page = "";
	if ($record_count[$i] >0){
		$page = onegate_pagebreak_selectbox_vunh($total_record[$i],$v_page,$v_limit_row,"GET_LIST_BY_USER_ID","form_id_".$arr_all_user[$i][0]) ."&nbsp;". onegate_change_record_number_page_vunh($v_limit_row,"GET_LIST_BY_USER_ID","form_id_".$arr_all_user[$i][0])
		;			
	}	
	$template->assign_block_vars("login_info_user", array(
			"div_id"=>"div_id_".$arr_all_user[$i][0],
			"form_id"=>"form_id_".$arr_all_user[$i][0],
			"fuseaction"=>$fuseaction,
			"hdn_page"=>$v_total_record[$i],
			"hdn_record_number_page"=>$v_page,
			"parent_id"=>$id_unit,
			"id"=>$arr_all_user[$i][0],
			"user_name"=>$arr_all_user[$i][3],
			"page"=>$page,
			"content_id"=>"content_id_".$arr_all_user[$i][0]
		));
	for ($j=0; $j<$record_count[$i]; $j++) {
		if ($v_current_style_name == "odd_row"){
			$v_current_style_name = "round_row";
		}else{
			$v_current_style_name = "odd_row";
		}			
		$template->assign_block_vars("login_info_user.login_info_row", array(
			"STT"=>$j + 1 + ($v_limit_row * ($v_page - 1)),
			//-----begin------- nieuvv - 090608------------- lay ngay dang nhap va ten user--------------------
			"Date"=>$arr_all_record[$i][$j]["C_DAY"]."-".$arr_all_record[$i][$j]["C_MONTH"]."-".$arr_all_record[$i][$j]["C_YEAR"],
			"User"=>$arr_all_user[$i][3],//_get_item_attr_by_id($_SESSION['arr_all_staff'],$arr_all_record[$i]["FK_USER"],'name'),
			//------------ the end nieuvv----------------------------------
			"IP"=>$arr_all_record[$i][$j]["C_IP"],
			"Time"=>$arr_all_record[$i][$j]["C_HOUR"].":".$arr_all_record[$i][$j]["C_MINUTE"].":".$arr_all_record[$i][$j]["C_SECOND"],
			"class_row"=>$v_current_style_name
		));
	}		
	if ($record_count[$i] < $v_limit_row) {
		for ($k = $record_count[$i]; $k < $v_limit_row; $k++) {
			if ($v_current_style_name == "odd_row"){
			$v_current_style_name = "round_row";
		}else{
			$v_current_style_name = "odd_row";
		}
		$template->assign_block_vars("login_info_user.login_info_row", array(
			"STT"=>$k + 1 + ($v_limit_row * ($v_page - 1)),
			"Date"=>"&nbsp;",
			"User"=>"&nbsp;",
			"IP"=>"&nbsp;",
			"Time"=>"&nbsp;",
			"class_row"=>$v_current_style_name
		));
		}
	}			
}
if ($use_page_or_row_limit) {
		$template->pparse("body");		
	}
	else {
		$template->pparse("body");
	}
?>